/*
 * @Date: 2023-04-30 18:31:07
 * @LastEditTime: 2023-06-23 11:21:17
 * 介绍:
 */
import RpopupPicker from "./RpopupPicker.vue";

export type Instance<D> = Omit<
  GenericComponentExports<typeof RpopupPicker>,
  "elect"
> & {
  elect: (D & { value: number }) | undefined;
};

/**获取pickerRef实例 */
export function useRpopupPickerRef<D>() {
  return ref<Instance<D>>();
}

export interface VerifyFunction<D> {
  (value: D, index: number): boolean | Promise<boolean> | void;
}
